int findMaxConsecutiveOnes(int* nums, int numsSize)
{
    int max_count = 0;
    int i = 0;
    while(i < numsSize) {
        if(nums[i] == 1) {
            int count = 1;
            while(i+1 < numsSize && nums[i+1] != 0) {
                count++;
                i++;
            }
            if(count > max_count) {
                max_count = count;
            }
        }
        i++;
    }
    return max_count;
}